home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 351-375 / disk_365 / password / password.doc < prev    next >
Text File  |  1992-05-06  |  18KB  |  404 lines

  1. ;--------------------------------------------------------------------------;
  2. ;       Program:  password                                                 ;
  3. ;    Programmer:  George Kerber                                            ;
  4. ;       Written:  05/22/89 - 04/14/90                                      ;
  5. ;       Version:  v1.42p                                                   ;
  6. ;   Application:  AmigaDOS & Workbench v1.3                                ;
  7. ;       Purpose:  Provides password protection.  Operation is similar to   ;
  8. ;                 the UNIX passwd command.                                 ;
  9. ;--------------------------------------------------------------------------;
  10.  
  11.   _________________________________________________________________________
  12.  
  13.        This program is SHAREWARE, see the SHAREWARE instructions below.
  14.   _________________________________________________________________________
  15.  
  16.            
  17. SYNTAX:  password [ -a SYS: ]
  18.                
  19. Where 'SYS:' is the drive where all your system files are located, normally
  20. this is your boot disk.  Password will assign all system directories to this
  21. drive.
  22.  
  23. Execute 'password -a SYS:' from your startup sequence to verify the password
  24. and set the SYS: drive.
  25.  
  26. Password change will only be accessible once the "password -a SYS:" program
  27. has been executed at boot time.  Both the '-a' and 'SYS:' options are
  28. required to verify the password during the boot up process.  A colon must
  29. be used after the drive designation.  Execute password with no options to
  30. change the password.
  31.  
  32.  
  33. Testing???
  34. ----------
  35. I suggest creating copying your Workbench 1.3 disk and installing the
  36. password program on it using supplied password.install script for a
  37. good way to test the program before installing it on your hard-drive or
  38. any other floppies.  You may have to make some room on a standard
  39. Workbench disk to install this program, I suggest getting rid of most
  40. of the stuff in the utilities directory.
  41.  
  42.  
  43. Installation:
  44. -------------
  45. The following directions must be followed exactly, or password will fail or
  46. destroy system security.
  47.  
  48. Copy password to the c: directory of your boot disk and to the c: directory
  49. of your system disk (if they are different).
  50.                 
  51.  
  52. Startup-Sequence:
  53. -----------------
  54.  
  55. A few commands for setup must be completed in your startup-sequence before
  56. executing password.  You should only execute what is absolutely necessary in
  57. your startup-sequence.  DO NOT execute any program that allows you to open
  58. a new window before the password program is executed.  PopCLI is a good
  59. example of a program not to execute before password.
  60.                 
  61. If you have a hard-drive and are booting from a floppy, you should mount the
  62. hard-drive first. 
  63.  
  64. For accounting purposes, your battery clock (if it exists) should be read
  65. before executing password.  (see below)  If you are using the AmigaDOS
  66. 'setclock' program to set your clock, and it is located in your SYS:c
  67. directory, it WILL BE EXECUTED from the password program.  It is not
  68. necessary to execute 'setclock' from your startup-sequence.  If you are
  69. using some other command to read your battery clock, you must execute this
  70. command before executing password in your startup-sequence.  If you are not
  71. using the AmigaDOS 'setclock' command, you should remove it from your c:
  72. directory.  
  73.  
  74.  
  75. At minimum (and probably maximum) your startup-sequence should look like
  76. this:
  77.             
  78.                    read your battery clock....
  79.                       (if you are not using the AmigaDOS setclock command)
  80.                    password -a df0:
  81.                    endcli
  82.  
  83. Password will open a shell and execute a file called s:startup2 if it
  84. exists.  Note that this file name is different from the standard AmigaDOS
  85. startupII file.
  86.  
  87. A workable startup-sequence and startup2 has been included with this archive
  88. that will work for a floppy system.
  89.                
  90. The following series of commands are executed from within the password
  91. program:
  92.       
  93.                 makedir ram:clipboards
  94.                 makedir ram:t
  95.                 assign SYS: (whatever drive you specified via options)
  96.                 assign C: sys:c 
  97.                 assign DEVS: sys:devs 
  98.                 assign LIBS: sys:libs 
  99.                 assign S: sys:s
  100.                 assign SYSTEM: sys:system 
  101.                 assign L: sys:l 
  102.                 assign FONTS: sys:fonts
  103.                 assign T: ram:t 
  104.                 assign CLIPBOARDS: ram:clipboards 
  105.                 assign ENV: ram:env
  106.                 mount newcon:
  107.                 mount speak:
  108.                 setclock load   (if it exists in your c: directory)
  109.                 resident >nil: cli l:shell-seg system pure add
  110.                 newshell newcon:0/0/640/200/Secure-Shell from s:startup2
  111.  
  112. A working copy of 'mount', 'resident' and 'newshell' must be in your c:
  113. directory.  The make directories and assigns do not use AmigaDOS commands.
  114.    
  115. As you can see, quite a bit of set-up is being done from the password
  116. program.  The commands listed above should not be repeated in the
  117. startup-sequence or startup2 scripts.
  118.  
  119. Please note that the ram:env directory is no longer being created by the
  120. password program.  You must create and assign this directory yourself in
  121. the startup2 file.  See the note below about the next version of Workbench
  122. for more information.
  123.  
  124. If password is satisfied, it will open a SHELL window and execute a script
  125. called s:startup2 if it exists.  Finish any commands that you need to
  126. complete in startup2.  Complete startup2 with a loadwb and endcli command if
  127. you want the workbench to be loaded and shown.  The startup2 file should
  128. be in the s: directory of your system disk as was specified in your
  129. startup-sequence.
  130.  
  131. There is a script called password.install which if executed will copy the
  132. password program and all supporting files to your system disk.  This script
  133. will modify your disks, so be sure to have current backups.  Be aware that
  134. your existing startup-sequence and startup2 files will be overwritten. This
  135. password.install script should only be used for non-hard-drive systems.
  136.  
  137. The following files should be copied or renamed as described below.  You may
  138. choose to use the supplied startup-sequence, startup2 and shell-startup or
  139. modify your existing files.
  140.  
  141.       
  142. DEFINITIONS:
  143.  
  144.          boot disk:  this is the disk that you boot from.  It may be df0: or
  145.                      your hard drive if you auto-boot.
  146.        system disk:  this is the disk that you assigned to sys: in your     
  147.                      startup-sequence.  The boot disk and system disk may be
  148.                      the same disk.
  149.                 
  150. RENAME:
  151.  
  152.         rename your c:dir command to c:dirx
  153.                 
  154. COPY:
  155.  
  156.         startup-sequence ----- copy to your boot disk s: directory.
  157.         startup2  ------------ copy to your system s: directory.
  158.         password ------------- copy to your boot and system c:
  159.                                directory. 
  160.         loop ----------------- rename to dir and copy to your boot c:       
  161.                                directory and system disk c: directory.
  162.         shell-startup -------- copy to your system s: directory.
  163.  
  164.  
  165.  
  166. DIRECTIONS:
  167. -----------
  168. Once you have installed password properly, reboot using your new boot disk. 
  169. Since this is the first time you have executed the program, you will be
  170. asked for the maintenance password.  This is a hard coded password that will
  171. always work.  Keep the maintenance password secure, since anyone will have
  172. complete access to your computer if they know the maintenance password.  You
  173. only have one chance to enter the maintenance password.
  174.  
  175. The maintenance password is: 'shareware' without the quotes.  This password
  176. cannot be located, viewed, or changed with a disk sector editor, like
  177. newzap.  
  178.  
  179. You will be prompted to enter a user password twice.  The user password must
  180. be between 5 and 15 characters.  When you finish creating the user password,
  181. your startup-sequence/startup2 will continue.  The user password you entered
  182. will be stored in a file called s:password.  The password is encoded and is
  183. secure from prying eyes.  If this file ever gets deleted, password will
  184. prompt for the maintenance password the next time the password is needed. 
  185. Deleting the password file will not help anyone gain access.  Never delete
  186. the s:password file for any reason once it is created.  If this file ever
  187. gets deleted, the password or loop program (described below) could force a
  188. reboot.
  189.                 
  190. Once you are booted up, you can change the user password anytime if you know
  191. the old password or the maintenance password.  Execute password with no
  192. options, you will be prompted for the old and new passwords.  Here you have
  193. the option of removing the password protection.  Press enter when you are
  194. asked for the new password.  If you choose to have the password protection
  195. removed, password will still execute on bootup, but will not ask for a
  196. password from the user.  You will only have 5 chances to complete the
  197. password change correctly, but you can always try again.  Entering a 'q' at
  198. any prompt will terminate the password change utility.  This feature allows
  199. your to remove the password protection easily, without having to change any
  200. of your system setup.
  201.  
  202. Everytime you boot from this disk, the user will be prompted for the user
  203. password (although the maintenance password can be entered) unless you have
  204. previously set password for "no password" as described above.  The user will
  205. only have three chances to enter the correct password.  If the user
  206. makes 3 invalid attempts, the program goes into a loop and the only way out
  207. is to reboot.
  208.  
  209.  
  210. ACCOUNTING:
  211. -----------
  212. There are many accounting methods used in the password program, so the
  213. system disk must be writable.  Password will check if it can write to the
  214. system disk and prompt the user if the sys: disk is writeprotected.  If the
  215. user doesn't correct the trouble, it's loop time....
  216.  
  217. Every incorrect password entered on bootup is recorded in a file called
  218. s:Access on your system disk.
  219.  
  220. The date and time of every boot is recorded in a file called s:usage on your
  221. system disk.
  222.  
  223. Every access attempt that fails for any reason has the date and time
  224. recorded in both the s:usage file and l:denied.
  225.     
  226. Once the user gives the correct password, the program checks if any previous
  227. access's have been denied, if so the date and time will be displayed to the
  228. user.  So whenever an authorized user boots up the Amiga, they will be
  229. notified of any unauthorized access attempts, and a permanent record of all
  230. unauthorized access attempts will be maintained in a file called l:denied.
  231.  
  232.  
  233. SECURITY:
  234. ---------
  235. There is a program called loop included in this archive.  This program can
  236. be used to assist in system security to insure that the system was booted
  237. properly using the password program.  I suggest that you rename the dir
  238. command in your c: directory to dirx and then rename loop to dir and copy it
  239. to your c: directory.  If the password program was used to boot the Amiga,
  240. executing the new dir command will call the dirx command and the user will
  241. not notice any difference.  If the Amiga was not booted using the password
  242. program when the dir command is executed, it's loop time.....
  243.  
  244. If you were going to break into someone's computer, what is the first
  245. command you'd run when you got the prompt?  Right, a dir command to look
  246. around!  Follow the above directions and running a dir will cause the system
  247. to lock up unless the disk was booted using password.
  248.  
  249. Loop can be used with almost any program and it has an option to only check
  250. for a proper boot up using the password program and loop if it wasn't.  No
  251. other output will be done.  This can be useful to add a "dir -q" to
  252. every script you have on your system, including your startup2 file.
  253.  
  254. NOTE:  loop will not work with some ARP commands (dir works, list           
  255.        doesn't????), and some won't work because of what they do, like cd.
  256.  
  257. Another useful security measure is to rename the password program to
  258. something that doesn't sound like password.  Try calling it mkdir or time or
  259. something like that.  If someone were to see mkdir -a dh0: in your
  260. startup-sequence, would they suspect a password program?
  261.               
  262. You should password protect every bootable disk you have. Of course you
  263. shouldn't write to your original disks, but they should be locked up
  264. somewhere away from your computer anyway.
  265.  
  266. Once someone can boot up on one of your disks, they can simply use the dir
  267. commands from that disk to look at your protected disk.  Maybe your should
  268. use the dir/loop trick on every copy of dir your have.
  269.  
  270. If you have a hard-drive, keep only what is absolutely necessary on your
  271. boot disk.  Keep a trick copy of dir, but don't keep any other commands like
  272. list, delete, type etc...  See the section for Advanced Users below. 
  273.  
  274. Total security on the Amiga is impossible.  But using this program can
  275. keep most people out.  Most people are computer illiterates and would never
  276. be able to break this program.  The key to the password program is to insure
  277. that it is executed from your startup-sequence.  There are ways to stop the
  278. startup-sequence from executing, but I won't describe them here.  By doing
  279. some of the system setup in the password program and using the loop program
  280. as described above should help.
  281.  
  282.  
  283. Advanced Security For Hard Disk Users:
  284. --------------------------------------
  285.  
  286. It is very difficult to secure an auto-booting Amiga.  
  287. There are a few steps that can make it more secure. 
  288.  
  289.     1.  Set up a small partition on your hard drive about
  290.         half a megabyte.  Make this your boot drive.  Keep all of your
  291.         normal workbench files and directories on your normal partition
  292.         and have password assign this as your SYS: disk.
  293.  
  294.     2.  Copy the contents of the following directories from a workbench 1.3 
  295.         disk to this partition:
  296.  
  297.                     libs
  298.                     l
  299.                     devs
  300.                     fonts
  301.          If you are using ARP, do not copy the arp.library to this
  302.          'fake' libs directory, unless you need it for some command
  303.          you are executing before password.
  304.  
  305.      3.  Create a c: directory but do not copy any workbench c: directory   
  306.          programs to it.  Copy only the commands that you are executing     
  307.          before the password program in your startup-sequence and the       
  308.          password program itself to this c: directory.
  309.                 
  310.      4.  Make many copies of the loop program included in this archive to   
  311.          the c: directory of your boot partition.  Rename these copies to   
  312.          standard workbench c: directory commands like, dir, cd, copy, list,
  313.  
  314.          info, etc.
  315.  
  316.      5.  Create a s:startup-sequence in your new small partition with only  
  317.          these commands:
  318.  
  319.                     password -a dh0:
  320.                     endcli
  321.  
  322. Now, if anyone stops your startup-sequence from executing before the
  323. password programs runs, the default SYS: disk will be your new partition. 
  324. If they try executing any programs that you have loop renamed to, the
  325. computer will lock up and a reboot will be required.
  326.  
  327.  
  328. SECTOR EDITOR CHANGES:
  329. ----------------------
  330. Some password strings can be changed by using a sector editor, like newzap. 
  331. Do not attempt to edit the program unless you have made backup copy of
  332. password and are familiar with sector editors.  If any of the shareware
  333. character strings are changed, the program will become inoperative.
  334.  
  335. You can change the speech strings if you don't like my choice of spoken
  336. error messages.  I left 60 characters for all the bad password speech
  337. strings.
  338.  
  339. You can change the c:setclock to a command your particular setup requires to
  340. read the battery clock.
  341.  
  342.  
  343. ICONS ?
  344. -------
  345. Password will operate correctly with the icon supplied for the password
  346. change function.  I suggest not allowing the password program to be executed
  347. from an icon to prevent anyone easy access to the program.  But the choice
  348. is yours.  An icon has been included if you desire this capability.  If you
  349. are using an icon and do not put the password program in your sys:c
  350. directory, you may have to give a full path in your startup-sequence.
  351.  
  352.  
  353. WORKBENCH v1.4 or v2.0 ???  (whatever they call the version after v1.3)
  354. ----------------------
  355. I no longer create the ram:env or assign ENV: to ram within the password
  356. program, since I suspect that the next version of Workbench will contain
  357. a real ENV: handler instead of it just being an assigned directory in
  358. ram:.  So, until the next version (if an ENV: handler is included) these
  359. commands MUST be in your startup2 file:
  360.  
  361.      c:makedir ram:env
  362.      c:assign ENV: ram:env
  363.  
  364. If an ENV: handler is not part of the next version, you will need to keep
  365. these commands in your startup2 file.
  366.  
  367. These commands are included in the startup2 file included in this archive.
  368.  
  369.  
  370. SHAREWARE:
  371. ----------                
  372.  
  373. Feel free to distribute this entire archive intact, but any user that finds
  374. this program useful and continues to use it should mail $25 to me as payment
  375. for the shareware program.  Send me a 5 to 10 character word you would like
  376. your maintenance password to me and you will receive a personal copy of the
  377. program with your custom maintenance password, without the shareware
  378. message that this program displays.  
  379.  
  380. If you send a disk with a copy of your current startup-sequence and
  381. startupII scripts, I will hard-code some of the commands into the password
  382. program to enhance the security of your system.  If all the assigns are
  383. added to the password program, this will make it even harder for anyone to
  384. use your system even if they do break in.
  385.  
  386. If v1.4 (or v2.0 if that's what it's called) breaks this program for any
  387. reason, all registered users will receive an updated version at no charge
  388. (on request). 
  389.  
  390. Please do not attempt to remove the shareware message using some type of
  391. sector editor.  If any character of the shareware message is changed, the
  392. program will become inoperative. 
  393.  
  394. I am making no guarantees of operation or security.  I take no
  395. responsibility, I hate responsibility.
  396.  
  397.  
  398.                               George Kerber
  399.                               19756 E. Linvale Drive
  400.                               Aurora, Colorado  80013
  401.                               (303) 693-2890
  402.  
  403.                               Compuserve:  74010,2132
  404.